package l1j.server.server.model.skill.skillmode;

import l1j.opqlo.Server.L1World.L1World;
import l1j.server.server.model.L1Character;
import l1j.server.server.model.L1Magic;
import l1j.server.server.model.Instance.L1NpcInstance;
import l1j.server.server.model.Instance.L1PcInstance;
import l1j.server.server.serverpackets.S_Message_YN;

/**
 * 呼喚盟友
 * @author dexc
 *
 */
public class CALL_CLAN extends SkillMode {

	public CALL_CLAN() {
	}

	@Override
	public int start(final L1PcInstance srcpc, final L1Character cha, final L1Magic magic, final int integer) throws Exception {
		final int dmg = 0;// magic.calcMagicDamage(L1SkillId.CURE_POISON);
		final L1PcInstance pc = (L1PcInstance) cha;
		final L1PcInstance clanPc = (L1PcInstance) L1World.getInstance().findObject(integer);
		if (clanPc != null) {
			clanPc.setTempID(pc.getId()); // 暫存盟主ID
			// 729 盟主正在呼喚你，你要接受他的呼喚嗎？(Y/N)
			clanPc.sendPackets(new S_Message_YN(729, "")); 
		}
		return dmg;
	}

	@Override
	public int start(final L1NpcInstance npc, final L1Character cha, final L1Magic magic,
			final int integer) throws Exception {
		final int dmg = 0;
		
		return dmg;
	}

	@Override
	public void start(final L1PcInstance srcpc, final Object obj) throws Exception {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void stop(final L1Character cha) throws Exception {
		// TODO Auto-generated method stub
	}
}
